package com.icedevcloud.datastruct.sort.comparablesort;

/**
 * 排序实体
 *
 * @author XiaoBingBy
 * @since 2020-12-14
 */
public class DataDto implements Comparable<DataDto> {

    private Integer sort;

    public Integer getSort() {
        return sort;
    }

    public void setSort(Integer sort) {
        this.sort = sort;
    }

    @Override
    public String toString() {
        return "DataDto{" +
                "sort=" + sort +
                '}';
    }

    @Override
    public int compareTo(DataDto o) {
        return this.getSort() - o.getSort();
    }
}
